package com.wwp.tbshop.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import butterknife.ButterKnife;

/**
 * Created by CC on 2016/11/15.
 */

public abstract class BaseActivity extends AppCompatActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //设置当前布局
        setContentView(getLayoutId());
        //butterKnife的初始化
        ButterKnife.bind(this);
        init();
    }

    /**
     * @return 当前Activity的布局
     */
    public abstract int getLayoutId();

    /**
     * 初始化页面
     */
    protected void init() {

    }


}
